`which python` points to the python I want, but `python` runs the wrong version
Posted
by tramdas
on Super User
See other posts from Super User
or by tramdas
Published on 2010-04-04T16:34:14Z
Indexed on
2010/04/04
16:43 UTC
Read the original article
Hit count: 491
I want to use python24 provided by ports, so I've installed it, and python_select -s
shows that the version I want is indeed selected. Running which python
gives /opt/local/bin/python
, and running /opt/local/bin/python
gives me the version I want. However when I run python
from the shell, I get the /usr/bin/python
version instead. I don't have a python alias.
Here's the situation in a nutshell:
- I believe the path is set up sensibly, and
which python
seems to confirm this. alias
only returns 1 entry, which is something unrelated to this.
Nevertheless, running python
from the bash shell gives me the wrong python!
I'm kind of stumped! What am I overlooking?
© Super User or respective owner